package com.yupi.yuojbackendserviceclient.service;



import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import yuojbackendmodel.model.entity.Question;
import yuojbackendmodel.model.entity.QuestionSubmit;


/**
 * @author JFeng
 * @description 针对表【question(题目)】的数据库操作Service
 * @createDate 2023-09-20 22:09:16
 */
@FeignClient(name = "yuoj-backend-question-service",path = "/api/question/inner")
public interface QuestionFeignClient {

    @GetMapping("/get/id")
    Question getQuestionById(@RequestParam("questionId") long questionId);

    @GetMapping("/question_submit/get/id")
    QuestionSubmit getQuestionSubmitById(@RequestParam("questionSubmitId") long questionSubmitId);

    @PostMapping("/question_submit/update")
    boolean updateQuestionSubmitById(@RequestBody QuestionSubmit questionSubmit);

    @PostMapping("/question/update")
    boolean updateQuestionById(@RequestBody Question question);
}
